<%--
  Created by IntelliJ IDEA.
  User: baiyu
  Date: 2021/11/3
  Time: 8:32 下午
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改服务</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
          integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">

    <script>
        debugger;
        let isUse = document.getElementsByName('isUse');
        if (${service.isUse}) {
            isUse.checked = 'checked';
        }
    </script>

</head>
<body>

<div class="row clearfix">
    <div class="col-md-12 column">
        <div class="page-header">
            <h1>
                <small>新增服务</small>
            </h1>
        </div>
    </div>
</div>

<form action="${pageContext.request.contextPath}/service/updateService" method="post">
    <div class="form-group" style="display: none;">
        <label for="serviceId">服务id</label>
        <input type="text" name="id" class="form-control" value="${service.id}" id="serviceId">
    </div>
    <div class="form-group">
        <label for="serviceName">服务名称</label>
        <input type="text" name="name" class="form-control" value="${service.name}" id="serviceName">
    </div>
    <div class="form-group">
        <label for="serviceIp">服务ip</label>
        <input type="text" name="ip" class="form-control" value="${service.ip}" id="serviceIp">
    </div>
    <div class="form-group">
        <label for="servicePort">服务接口</label>
        <input type="text" name="port" class="form-control" value="${service.port}" id="servicePort">
    </div>
    <div class="form-group">
        <label for="information">服务信息</label>
        <input type="text" name="information" class="form-control" value="${service.information}" id="information">
    </div>
    <div class="checkbox">
        <label>
            <input name="isUse" type="checkbox">是否在用
        </label>
    </div>
    <div class="form-group">
        <input type="submit" class="btn btn-default" value="修改">
    </div>
</form>

</body>
</html>
